﻿@using KPIS.GERP.Models.ICM
@model BidderCollateral

@{
    Layout = "~/Views/Shared/_EmptyLayout.cshtml";
    ViewBag.Title = "หลักประกัน";
    ViewBag.Descr = "เพิ่มข้อมูล" + ViewBag.Title;
}

@using (Html.BeginForm("Create", "BidderCollateral", new { BidderId = Model.BidderId }, FormMethod.Post, new { @class = "form-horizontal" }))
{
    @Html.AntiForgeryToken()

    <div class="block-button-menu-above">
        @Html.ActionLink("กลับไปหน้าแสดงข้อมูลทั้งหมด", "Index", new { BidderId = Model.BidderId }, new { @class = "btn btn-gray button-standard-width btn-small", role = "button" })
        @Html.ButtonSubmit()
    </div>
    
    <div class="alert-error">@Html.ValidationSummary()</div>
    @Html.Partial("_EditorForm")

}

@section scripts
{
    <script>
        $("form").submit(function (e) {
            e.preventDefault();
            var currentForm = this;
            bootbox.confirm(function (result) {
                if (result) {
                    currentForm.submit();
                }
            });
        });
     </script>
 }